<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title><?php echo R('Other/site',array('id'=>'1'));?> 后台管理</title>
    <meta name="keywords" content="<?php echo R('Other/site',array('id'=>'2'));?>"/>
    <meta name="description" content="<?php echo R('Other/site',array('id'=>'3'));?>"/>


    <!-- Bootstrap -->
  <link href="/Public/style/css/bootstrap.min.css" rel="stylesheet">

  <!-- My style -->
  <link href="/Public/style/css/admin.css" rel="stylesheet">

  <!-- jquery  -->
  <script src="/Public/style/js/jquery.min.js"></script>
  <script src="/Public/style/js/bootstrap.min.js"></script>
  <!-- other -->
 <script src="/Public/layer/dialog.js"></script>
  <script src="/Public/layer/layer.js"></script>
    <script>
        $(function(){
            var h = $('.whiteblock').height();

            if(h >= 1 &&  h <= 549 ){
                $('.slid_right').height(h+=300);
            }

            if(h <= 550){
                $('.slid_right').height(h+200);
            }

        })
    </script>
</head>
<body>
  <nav class="navbar navbar-default navbar-fixed-top" role="navigation">
  <div class="container-fulid" >
  <div style="width: 95%;margin:0 auto;">
      <div class="navbar-header">
        <a class="navbar-brand" href="javascript:;" ><span class="text-danger">  <?php echo R('Other/site',array('id'=>'1'));?> </span> <small> 网站管理系统</small></a>
      </div>
      <ul class="nav navbar-nav navbar-right">
        <li>
          <a href="#" class="dropdown-toggle" data-toggle="dropdown"><?php echo $_SESSION['username'];?> <span class="caret"></span></a>
          <ul class="dropdown-menu" role="menu">
            <li><a href="<?php echo U('Index/loginOut');?>">退出</a></li>
          </ul>
        </li>
      </ul>
    </div>
  </div>
</div>
</nav>
     
    <script>
        $(function () {
        $('#tbkitemup').click(function () {
        var info = $('#tbkitemget').serialize();
        $.ajax({
        type: "POST",
        url: "<?php echo U('Main/upGoodsApi');?>",
        data: info,
        dataType: 'text',
        success: function (rsault) {
        var data = eval('(' + rsault + ')');
        if (data.status == '1') {
        return dialog.success(data.message);
        } else {
        return dialog.error(data.message);
        }
        }
        });
        })

        $('#jutqgup').click(function () {
        var info = $('#jutqgget').serialize();
        $.ajax({
        type: "POST",
        url: "<?php echo U('Main/upGoodsApi');?>",
        data: info,
        dataType: 'text',
        success: function (rsault) {
        var data = eval('(' + rsault + ')');
        if (data.status == '1') {
        return dialog.success(data.message);
        } else {
        return dialog.error(data.message);
        }
        }
        });

        })
          $('#favoritesitemup').click(function () {
        var info = $('#favoritesitemget').serialize();
        $.ajax({
        type: "POST",
        url: "<?php echo U('Main/upGoodsApi');?>",
        data: info,
        dataType: 'text',
        success: function (rsault) {
        var data = eval('(' + rsault + ')');
        if (data.status == '1') {
        return dialog.success(data.message);
        } else {
        return dialog.error(data.message);
        }
        }
        });
        })
        })
    </script>
    <div class="container-fulid">
        <div class="col-sm-2">
            <div class="row">
    <div class="slide_menu">
        <ul>
            <li <?php if(ACTION_NAME== 'config'): ?>class="active"<?php endif; ?>><a href="<?php echo U('Main/config');?>">系统设置</a></li>
            <li <?php if(ACTION_NAME== 'goods'): ?>class="active"<?php endif; ?>><a href="<?php echo U('Main/goods');?>">淘宝客设置</a></li>
            <!-- <li <?php if(ACTION_NAME== 'Index'): ?>class="active"<?php endif; ?>><a href="<?php echo U('Content/china');?>">中文内容</a></li> -->
            <!-- <li><a href="">商品管理</a></li> -->
            <!-- <li><a href="">图库管理</a></li> -->
            <!-- <li><a href="">其他管理</a></li> -->
        </ul>
    </div>
</div>
            </div>
            <div class="col-sm-10 slid_right">
                <br/>
                <div class="whiteblock">
                    <div class="page-header" style="margin: 30px;">
                        <h3 class="text-primary">
                            淘宝客API参数设置
                            <small>
                                设置项
                            </small>
                        </h3>
                    </div>
                    <br/>
                    <div class="getfrom">
                        <form id="tbkitemget">
                            <table class="table table-bordered">
                                <tr>
                                    <th colspan="8">
                                        taobao.tbk.item.get (淘宝客商品查询)
                                        <a
                                            href="http://open.taobao.com/docs/api.htm?spm=a219a.7629065.0.0.4KXBPi&apiId=24515"
                                            target="_blank">
                                            相关手册
                                        </a>
                                    </th>
                                </tr>
                                <tr>
                                    <td>
                                        <label>
                                            所在城市
                                        </label>
                                        <input type="text" class="form-control" name="itemloc" placeholder="空为全国"
                                            value="<?php echo ($itemget["itemloc"]); ?>"/>
                                        </td>
                                        <td>
                                            <label>
                                                排序
                                            </label>
                                            <select name="sort" class="form-control">
                                                <option value="_des" selected="selected">
                                                    降序
                                                </option>
                                                <option value="_asc">
                                                    升序
                                                </option>
                                                <option value="total_sales">
                                                    销量
                                                </option>
                                                <option value="tk_rate">
                                                    淘客佣金比率
                                                </option>
                                                <option value="tk_total_sales">
                                                    累计推广量
                                                </option>
                                                <option value="tk_total_commi">
                                                    总支出佣金
                                                </option>
                                            </select>
                                        </td>
                                        <td>
                                            <label class="text-danger">
                                                折扣价下限
                                            </label>
                                            <input type="text" class="form-control" name="start_price"
                                                value="<?php echo ($itemget["start_price"]); ?>"/>
                                            </td>
                                            <td>
                                                <label class="text-danger">
                                                    折扣价上限
                                                </label>
                                                <input type="text" class="form-control" name="end_price" value="<?php echo ($itemget["end_price"]); ?>"/>
                                            </td>
                                            <td>
                                                <label class="text-danger">
                                                    佣金比上限
                                                </label>
                                                <input type="text" class="form-control" name="start_tk_rate" value="<?php echo ($itemget["start_tk_rate"]); ?>"/>
                                            </td>
                                            <td>
                                                <label class="text-danger">
                                                    佣金比下限
                                                </label>
                                                <input type="text" class="form-control" name="end_tk_rate"  value="<?php echo ($itemget["end_tk_rate"]); ?>"/>
                                            </td>
                                            <td>
                                                <label>
                                                    开始页
                                                </label>
                                                <input type="text" class="form-control" name="page_no"  value="<?php echo ($itemget["page_no"]); ?>"/>
                                            </td>
                                            <td>
                                                <label>
                                                    每页数量
                                                </label>
                                                <input type="text" class="form-control" name="page_size" value="<?php echo ($itemget["page_size"]); ?>"/>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="8" class="text-right">
                                                <input type="hidden" name="id" value="1"/>
                                                <button type="button" class="btn btn-primary btn-sm" id="tbkitemup">
                                                    提交本项
                                                </button>
                                            </td>
                                        </tr>
                                    </table>
                                </form>
                                <br/>
                                <form  id="jutqgget">
                                    <table class="table table-bordered">
                                        <tr>
                                            <th colspan="6">
                                                taobao.tbk.ju.tqg.get (淘抢购api)
                                                <a href="http://open.taobao.com/docs/api.htm?spm=a219a.7395905.0.0.R27VXi&apiId=27543" target="_blank">
                                                    相关手册
                                                </a>
                                            </th>
                                        </tr>
                                        <tr>
                                            <td>
                                                <label class="text-danger">
                                                    推广位id : adzone_id
                                                </label>
                                                <input type="text" class="form-control" name="adzoneid" value="<?php echo ($jutqgget["adzoneid"]); ?>" />
                                            </td>
                                            <td>
                                                <label class="text-danger">
                                                    最早开团时间
                                                </label>
                                                <input type="text" class="form-control" name="start_time" value="<?php echo ($jutqgget["start_time"]); ?>" />
                                            </td>
                                            <td>
                                                <label class="text-danger" >
                                                    最晚开团时间
                                                </label>
                                                <input type="text" class="form-control" name="end_time" value="<?php echo ($jutqgget["end_time"]); ?>"/>
                                            </td>
                                            <td>
                                                <label>
                                                    初始页
                                                </label>
                                                <input type="text" class="form-control" name="page_no" value="<?php echo ($jutqgget["page_no"]); ?>" />
                                            </td>
                                            <td>
                                                <label>
                                                    页数量 :默认96，1~96
                                                </label>
                                                <input type="text" class="form-control" name="page_size" value="<?php echo ($jutqgget["page_size"]); ?>" />
                                            </td>
                                        </tr>
                                        <tr>
                                            <td colspan="6" class="text-right">
                                                <input type="hidden" name="id" value="2"/>
                                            </input>
                                            <button type="button" class="btn btn-primary btn-sm" id="jutqgup">
                                                提交本项
                                            </button>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                            <br/>
                            <form id="favoritesitemget">
                                <table class="table table-bordered">
                                    <tr>
                                        <th colspan="3">
                                            taobao.tbk.uatm.favorites.item.get (获取淘宝联盟选品库的宝贝信息)
                                            <a href="http://open.taobao.com/docs/api.htm?spm=a219a.7395905.0.0.oHH3tF&apiId=26619" target="_bplank">
                                                相关手册
                                            </a>
                                        </th>
                                    </tr>
                                    <tr>
                                        <td>
                                            <label class="text-danger">
                                                推广位id : adzone_id
                                            </label>
                                            <input type="text" class="form-control" name="adzoneid" value="<?php echo ($favoritesitemup["adzoneid"]); ?>" />
                                        </td>
                                        <td>
                                            <label>
                                                初始页
                                            </label>
                                            <input type="text" class="form-control" name="page_no" value="<?php echo ($favoritesitemup["page_no"]); ?>" />
                                        </td>
                                        <td>
                                            <label>
                                                页数量，默认20，1~100 <span class="text-danger">建议按 1个分类 * 8计算</span>
                                            </label>
                                            <input type="text" class="form-control" name="page_size" value="<?php echo ($favoritesitemup["page_size"]); ?>" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3" class="text-right">
                                        <input type="hidden" name="id" value="3"></input>
                                            <button type="button" class="btn btn-primary btn-sm" id="favoritesitemup">提交本项</button>
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                    </div>
                    <br/>
                </div>
                <div class="clearfix">
                </div>
            </div>

   <footer >
	<div class="footer text-center" >火星猫网络服务 &nbsp;&nbsp;备案号：<?php echo R('Other/site',array('id'=>'4'));?></div>
   </footer>
</body>
</html>